public class NewProblem2 {

	public static void main(String[] args) {
		int sum = 0;
		int previous = 0;
		int i = 0;
		while (i < 4000000) {

			previous = i;

			sum = sum + previous;
			i++;

		}

		System.out.println(sum);
	}

}
